package com.example.nonacademic_education.constant;

import com.example.nonacademic_education.data.request.UploadFileInfo;
import com.example.nonacademic_education.entity.FileApply;
import com.example.nonacademic_education.entity.FileInfo;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author xinmiao
 * @description
 * @date 2023/4/10 11:36
 */
//nohup java -jar non-academic_education.jar &> log-non.log &
public class Main {
    public static void main(String[] args) {
//        Object o=new FileApply();
//        Field[] fields = o.getClass().getDeclaredFields();
//        StringBuilder res=new StringBuilder();
//        res.append("{\n");
//        //遍历
//        for (int i = 0; i < fields.length; i++) {
//            fields[i].setAccessible(true);//使私有对象可以访问
//            String name = fields[i].getName();//获取属性名
//            String typeName = fields[i].getType().getName();//获取类型 例如:java.lang.Integer
//            //System.out.println(name+","+typeName);
//            res.append("\t\"").append(name).append("\":");
//            if (typeName.equals("java.lang.String")){
//                res.append("\"111\"");
//            }else if(typeName.equals("java.lang.Date")){
//                res.append(1642662478000L);
//            }else {
//                res.append(1);
//            }
//            if (i< fields.length-1){
//                res.append(",\n");
//            }else {
//                res.append("\n");
//            }
//        }
//        res.append("}");
//        System.out.println(res.toString());
//
//        List<Integer> list1 = Arrays.asList(1, 2, 3, 4, 5);
//        List<Integer> list2 = Arrays.asList(3,4, 5, 6, 7, 8);
//
//        List<Integer> diff = list1.stream()
//                .filter(n -> !list2.contains(n))
//                .collect(Collectors.toList());
//
//        System.out.println("List 1: " + list1);
//        System.out.println("List 2: " + list2);
//        System.out.println("Different elements: " + diff);
//        List<Integer> aaa=Arrays.asList(1, 2, 3, 4, 5);
//        List<Integer> oldList = Arrays.asList(3,4, 5, 6, 7, 8);Arrays.asList(3,4, 5, 6, 7, 8);
//        List<Integer> addList=new ArrayList<>(aaa);
//        addList.removeAll(oldList);
//        List<Integer> delList=new ArrayList<>(oldList);
//        delList.removeAll(aaa);
//        System.out.println(addList);
//        System.out.println(delList);
//        Calendar calendar = Calendar.getInstance();
//        int year = calendar.get(Calendar.YEAR);
//        System.out.println(year);
//        String maxNoThisClassString="SP1063812020230052";
//        System.out.println(Integer.parseInt(maxNoThisClassString.substring(maxNoThisClassString.length()-4)));
        System.out.println("https://fxljy.cwnu.edu.cn/api/v2/file/getFile?path=2024/西华师范大学社会艺术水平考级教师培训朗诵主持（少儿口才）专业第三期初级班/7305测试上传.xlsx".substring(Constant.PATH_POSITION-1));
    }
}
